<?php
// +----------------------------------------------------------------------
// | author: admin
// +----------------------------------------------------------------------

namespace app\adminapi\validate\setting;


use app\common\validate\BaseValidate;


/**
 * CarType验证器
 * Class CarTypeValidate
 * @package app\adminapi\validate\setting
 */
class CarTypeValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'price' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'name' => '车辆类型名称',
        'price' => '价格',
    ];


    /**
     * @notes 添加场景
     * @return CarTypeValidate
     * @author admin
     * @date 2025/04/27 10:41
     */
    public function sceneAdd()
    {
        return $this->only(['name','price']);
    }


    /**
     * @notes 编辑场景
     * @return CarTypeValidate
     * @author admin
     * @date 2025/04/27 10:41
     */
    public function sceneEdit()
    {
        return $this->only(['id','name','price']);
    }


    /**
     * @notes 删除场景
     * @return CarTypeValidate
     * @author admin
     * @date 2025/04/27 10:41
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return CarTypeValidate
     * @author admin
     * @date 2025/04/27 10:41
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}